

<html>
	<head>
		<meta charset='utf-8' />
		<title>管理登陆</title>
		<style>
			@media screen and (max-width:450px){
				#Content{width:98%;margin:0 auto}
			}
			@media screen and (min-width:450px){
				#Content{width:450px;margin:0 auto}
			}
		</style>
	</head>
<body>
	<div id='Content'>
		<h1 style='text-align:center;color:red'>管理登陆</h1>

		<div style='text-align:center'><input type="text" id='user' placeholder='用户名'></div>
		<div style='margin:20px 0;text-align:center'><input id='pwd' type="password" placeholder='密码'></div>

		<div style='text-align:center'>
			<button id='login'>登陆</button>
			<button id='back'>返回</button>
		</div>
	</div>
</body>
</html>
<script src='ext/jquery.js'></script>
<script>
$(function(){
	$('#login').click(function(){
		var user = $('#user').val().trim();
		var pwd = $('#pwd').val().trim();
		var data = {
			user:user,
			pwd:pwd,
			type:'login'
		}
		Ajax(data,function(res){
			C(res);
			if(res == 'ok'){
				sessionStorage.user = user;
				location.replace('index.html');
			}else{
				alert('用户名或密码不正确！');
			}
		},url);
	});



	$('#back').click(function(){
		location.replace('index.html');
	});
});
</script>